class Role < ActiveRecord::Base
   has_many :roleships, :dependent => :delete_all
   has_many :users, :through => :roleships
   
   def self.admin
     admin = find_role 'admin'
   end

   def self.guest
     guest = find_role 'guest'
   end

   def self.power_user
     power_user = find_role 'power_user'
   end

   def self.find_role(role)
     theRole = Role.find(:first, :conditions => [ "name = ?", role])
   end
end
